
#ifndef Velyn_SubdivisionSurface_h
#define Velyn_SubdivisionSurface_h

#include "PolygonMesh.h"
#include "Subdivide.h"
#include "Smooth.h"

namespace Velyn {
    
    namespace Subdivisions {
        
        class SubdivisionSurface : public PolygonMesh {
            
        protected:
            
            int numberSubdivisions;
            
        public:
            
            SubdivisionSurface(string texture, string material) : PolygonMesh(texture, material) {
                numberSubdivisions = 0;
            }
            
            ~SubdivisionSurface() {}
            
            void subdivideSurface() {
                Subdivide subdivide;
                mesh = subdivide.subdivideSurface(mesh);
                numberSubdivisions++;
            }
            
            void smoothSurface() {
                Smooth smooth;
                mesh = smooth.smoothSurface(mesh);
                numberSubdivisions++;
            }
            
            void reset() {
                numberSubdivisions = 0;
                resetMesh();
            }
            
        };
        
    }
    
}

#endif
